package com.bishe.util;

import cn.hutool.core.util.StrUtil;
import com.bishe.config.DataException;
import com.bishe.entity.response.LoginInfo;

public class LoginUtils {

    public static void checkLoginInfo(LoginInfo loginInfo){
        if(loginInfo ==null){
            throw new DataException("登录失败!");
        }

        if (StrUtil.isEmpty(loginInfo.getUserName())|| StrUtil.isEmpty(loginInfo.getPassword())){
            throw new DataException("用户名密码为空!");
        }
    }
}
